package utils.global;

import sun.misc.IOUtils;

import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;

public class UtilsConfig {

    private String version = "v1.0.0";

    public static String printInfo = "|| Utils Manager add Bean ( %s ) success.";

    public UtilsConfig() throws IOException {
        InputStream resourceAsStream = UtilsConfig.class.getClassLoader().getResourceAsStream("utils-banner.txt");
        String banner = new String(IOUtils.readFully(resourceAsStream, -1, true), StandardCharsets.UTF_8);
        System.out.println(banner);
        System.out.print("\033[0;0;31m:: Utils Manager ::\033[0;0;0m");
        System.out.print("                            ");
        System.out.println("\033[0;0;32m( " + version + " )\033[0;0;0m\n");
    }
}
